{% extends 'base.html' %}

{% block content %}
{#    <p>hello</p>#}
{#    {{ '{{' + 'hello' + '}}' }}#}
{#    {% raw %}#}
{#    <ul>#}
{#        {% for item in seq %}#}
{#        <li>{{ item.name }}</li>#}
{#        <li>Are you OK</li>#}
{#        {% endfor %}#}
{#    </ul>#}
{#    {% endraw %}#}
    <div id="app">
{#    <i-button @click="show">Click me!</i-button>#}
{#        <Input v-model="value" placeholder="请输入..." style="width: 300px"></Input>#}
{#    <Modal v-model="visible" title="Welcome">{{ '{{ value }}' }}</Modal>#}
    <div class="layout" :class="{'layout-hide-text': spanLeft < 5}">
        <Row type="flex">
            <Col :span="spanLeft" class="layout-menu-left">
                <Menu active-name="1" theme="dark" width="auto">
                    <div class="layout-logo-left"></div>
                    <MenuItem name="1">
                        <Icon type="ios-navigate" :size="iconSize"></Icon>
                        <span class="layout-text">选项 1</span>
                    </MenuItem>
                    <MenuItem name="2">
                        <Icon type="ios-keypad" :size="iconSize"></Icon>
                        <span class="layout-text">选项 2</span>
                    </MenuItem>
                    <MenuItem name="3">
                        <Icon type="ios-analytics" :size="iconSize"></Icon>
                        <span class="layout-text">选项 3</span>
                    </MenuItem>
                </Menu>
            </Col>
            <Col :span="spanRight">
                <div class="layout-header">
                    <Button type="text" @click="toggleClick">
                        <Icon type="navicon" size="32"></Icon>
                    </Button>
                </div>
                <div class="layout-breadcrumb">
                    <Breadcrumb>
                        <BreadcrumbItem href="#">首页</BreadcrumbItem>
                        <BreadcrumbItem href="#">应用中心</BreadcrumbItem>
                        <BreadcrumbItem>某应用</BreadcrumbItem>
                    </Breadcrumb>
                </div>
                <div class="layout-content">
                    <div class="layout-content-main">内容区域</div>
                </div>
                <div class="layout-copy">
                    2011-2016 &copy; TalkingData
                </div>
            </Col>
        </Row>
    </div>
</div>
<script>
    new Vue({
        el: '#app',
        data: {
            visible: false,
            value: 'Hello',
            spanLeft: 5,
            spanRight: 19
        },
        computed: {
            iconSize () {
                return this.spanLeft === 5 ? 14 : 24;
            }
        },
        methods: {
            toggleClick () {
                if (this.spanLeft === 5) {
                    this.spanLeft = 2;
                    this.spanRight = 22;
                } else {
                    this.spanLeft = 5;
                    this.spanRight = 19;
                }
            },
{#        }#}
{#        methods: {#}
            show: function () {
                this.visible = true;
            }
        }
    })
  </script>
{% endblock %}